package com.netpace.iem.umair.model;

public class Item {
	// State
	private int id;
	private String name;
	private Unit unit;
	private float qty;
	private double unitPrice;
	private float discount;
	private double amount;
	
	// Constructors
	public Item() {
	
	}
	
	public Item(int id, String name, Unit unit, float qty, double unitPrice, float discount) {
		this.id = id;
		this.name = name;
		this.unit = unit;
		this.qty = qty;
		this.unitPrice = unitPrice;
		this.discount = discount;
		this.amount = this.unitPrice * this.qty;
	}
	public Item(int id, String name, Unit unit, int qty, int unitPrice) {
		this(id, name, unit, qty, unitPrice, 0);
	}
	
	// Getters
	public int getId() {
		return id;
	}
	public String getName() {
		return name;
	}
	public Unit getUnit() {
		return unit;
	}
	public float getQty() {
		return qty;
	}
	public double getUnitPrice() {
		return unitPrice;
	}
	public float getDiscount() {
		return discount;
	}
	public double getAmount() {
		return amount;
	}
	
	// Setters
	public void setId(int id) {
		this.id = id;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setUnit(Unit unit) {
		this.unit = unit;
	}
	public void setQty(float qty) {
		this.qty = qty;
	}
	public void setUnitPrice(double unitPrice) {
		this.unitPrice = unitPrice;
	}
	public void setDiscount(float discount) {
		this.discount = discount;
	}
}
